package com.qfmy.web.app.controller.conmon;

import com.qfmy.common.result.Result;
import com.qfmy.web.app.service.conmon.NovelCommonService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 清风明月
 * @Package com.qfmy.web.app.controller.common
 * @date 2025/10/31
 * @description 小说公共类
 */
@RestController
@SuppressWarnings("all")
@RequestMapping("/app")
public class NovelCommonController {

    /**
     * 注入service
     */
    @Resource
    private NovelCommonService novelCommonService;

    /**
     * 根据小说的id生成海报
     */
    @RequestMapping("/generatePoster")
    public Result generatePoster(@RequestParam Integer novelId) {
        String poster = novelCommonService.generatePoster(novelId);
        return Result.ok(poster);
    }

}
